<template>
  <div id="player" class="videoContainer"></div>
</template>

<script lang="ts" setup>
  import { onBeforeUnmount, onMounted } from 'vue';
  import { destroyVideo, initVideo } from '@/components/GlobalVideo';

  onMounted(() => {
    initVideo();
  });

  onBeforeUnmount(() => {
    destroyVideo();
  });
</script>

<style lang="less" scoped>
  .videoContainer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    z-index: 2;
  }
</style>
